#!/bin/bash

foamCleanTutorials
rm -rf 0 > /dev/null 2>&1
cp -r 0_org 0  > /dev/null 2>&1
cp system/controlDict_org system/controlDict
blockMesh | tee log.blockMesh
refineWallLayer -overwrite "(cylinder)" 0.5
refineWallLayer -overwrite "(cylinder)" 0.4
refineWallLayer -overwrite "(cylinder)" 0.2
refineWallLayer -overwrite "(cylinder)" 0.1
checkMesh | tee log.checkMesh
renumberMesh -overwrite -noFunctionObjects | tee log.renumbermesh
pisoFoam  | tee log.solver
pisoFoam  -postProcess -func yPlus -latestTime -noFunctionObjects | tee log.yPlus
